import fetch from '../common1'
// 商品列表
export const good_list = (params) => {
    return fetch.get(params, 'shop/good-list');
}

// 搜索商品
export const search_good = (params) => {
    return fetch.get(params, 'shop/good-list');
}

//商品详情
export const good_detail = (params) => {
    return fetch.get(params, 'shop/good-detail');
}

//添加商品
export const add_good = (params) => {
    return fetch.post(params, 'shop/add-good');
}

//编辑商品
export const edit_good = (params) => {
    return fetch.post(params, 'shop/edit-good');
}

//删除商品
export const del_good = (params) => {
    return fetch.post(params, 'shop/del-good');
}

//上下架
export const down_good = (params) => {
    return fetch.post(params, 'shop/down-good');
}

//分类列表
export const cate_list = (params) => {
    return fetch.get(params, 'shop/cate-list');
}

//分类详情
export const cate_detail = (params) => {
    return fetch.get(params, 'shop/cate-detail');
}

//添加分类
export const add_cate = (params) => {
    return fetch.post(params, 'shop/add-cate');
}

//编辑分类
export const edit_cate = (params) => {
    return fetch.post(params, 'shop/edit-cate');
}

//删除分类
export const del_cate = (params) => {
    return fetch.post(params, 'shop/del-cate');
}